package com.intretech.umsin.system.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.intretech.umsin.common.web.ApiResult;
import com.intretech.umsin.system.param.SysDictParam;
import com.intretech.umsin.system.vo.SysDictVo;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @version V1.0
* 系统字典定义: sys_dict 为其他服务提供内部调用接口 API.
* @InterfaceName: SysDictApi
* @Description: 系统字典定义:sys_dict 为其他服务提供内部调用接口 API.
* @author: 李启联
* @date:   2022-8-16 16:44:06
* @Copyright: Copyright (c) 2022
*/

public interface SysDictApi {

    @GetMapping("/system/sysdict/get/{id}")
    public ApiResult<SysDictVo> querySysDictById(@PathVariable("id") String id);

    @PostMapping("/system/sysdict/listByIds")
    public ApiResult<List<SysDictVo>> querySysDictByIds(@RequestBody List<String> ids);

    @PostMapping("/system/sysdict/page/{pageNo}/{pageSize}")
    public ApiResult<IPage<SysDictVo>> querySysDictForPage(@RequestBody SysDictParam params, @PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize);

    @PostMapping("/system/sysdict/list")
    public ApiResult<List<SysDictVo>> querySysDictForList(@RequestBody SysDictParam params);

    @PostMapping("/system/sysdict/add")
    public ApiResult<SysDictVo> addSysDict(@RequestBody SysDictVo vo);

    @PostMapping("/system/sysdict/adds")
    public ApiResult<List<SysDictVo>> addsSysDict(@RequestBody List<SysDictVo> voList);

    @PutMapping("/system/sysdict/modify")
    public ApiResult<SysDictVo> modifySysDict(@RequestBody SysDictVo vo);

    @PutMapping("/system/sysdict/modifys")
    public ApiResult<List<SysDictVo>> modifysSysDict(@RequestBody List<SysDictVo> voList);

    @DeleteMapping("/system/sysdict/remove/{id}")
    public ApiResult<Void> removeSysDict(@PathVariable("id") String id);

    @DeleteMapping("/system/sysdict/removes")
    public ApiResult<Void> removesSysDict(@RequestBody List<String> ids);

}